package com.biz.primus.model.sso.auth.vo;

import com.biz.primus.base.enums.CommonStatus;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * Created by younger on 17/11/3.
 */
public class ResourceVO extends AbstractDescribableItem {
    private static final long serialVersionUID = 3927505297606883628L;

    private GrantedAuthority grantedAuthority;

    public ResourceVO(){

    }

    public ResourceVO(String id, String name, String description, CommonStatus status, GrantedAuthority grantedAuthority, Integer orderIndex) {
        super(id, name, description, orderIndex, status);
        this.grantedAuthority = grantedAuthority;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    /**
     * {@linkplain ResourceVO#grantedAuthority}
     */
    public GrantedAuthority getGrantedAuthority() {
        return grantedAuthority;
    }

    /**
     * {@linkplain ResourceVO#grantedAuthority}
     */
    public void setGrantedAuthority(GrantedAuthority grantedAuthority) {
        this.grantedAuthority = grantedAuthority;
    }
}
